<?php 	
	$mod[0][0][0] = "NEGOCIO";
	$mod[0][0][1] = "Empresa";
	$mod[0][0][2] = 'href="app/view/negocio/register.php" target="ifr_colum_der"';
	
	$mod[0][1][0] = "NEGOCIO";
	$mod[0][1][1] = "Surculsal";
	$mod[0][1][2] = 'href="app/view/negocio/register.php" target="ifr_colum_der"';
	
	$mod[0][2][0] = "NEGOCIO";
	$mod[0][2][1] = "Almacen";
	$mod[0][2][2] = 'href="app/view/negocio/register.php" target="ifr_colum_der"';
	
	
	$mod[1][0][0] = "NOTIFICACION";
	$mod[1][0][1] = "Empresa";
	$mod[1][0][2] = 'href="app/view/negocio/register.php" target="ifr_colum_der"';
	
	$mod[1][1][0] = "NOTIFICACION";
	$mod[1][1][1] = "Surculsal";
	$mod[1][1][2] = 'href="app/view/negocio/register.php" target="ifr_colum_der"';
	
	$mod[1][2][0] = "NOTIFICACION";
	$mod[1][2][1] = "Almacen";
	$mod[1][2][2] = 'href="app/view/negocio/register.php" target="ifr_colum_der"';
	
	
	$mod[2][0][0] = "REPORTE";
	$mod[2][0][1] = "Empresa";
	$mod[2][0][2] = 'href="app/view/negocio/register.php" target="ifr_colum_der"';
	
	$mod[2][1][0] = "REPORTE";
	$mod[2][1][1] = "Surculsal";
	$mod[2][1][2] = 'href="app/view/negocio/register.php" target="ifr_colum_der"';
	
	$mod[2][2][0] = "REPORTE";
	$mod[2][2][1] = "Almacen";
	$mod[2][2][2] = 'href="app/view/negocio/register.php" target="ifr_colum_der"';
	
	
	$mod[3][0][0] = "SEGURIDAD";
	$mod[3][0][1] = "Empresa";
	$mod[3][0][2] = 'href="app/view/negocio/register.php" target="ifr_colum_der"';
	
	$mod[3][1][0] = "SEGURIDAD";
	$mod[3][1][1] = "Surculsal";
	$mod[3][1][2] = 'href="app/view/negocio/register.php" target="ifr_colum_der"';
	
	$mod[3][2][0] = "SEGURIDAD";
	$mod[3][2][1] = "Almacen";
	$mod[3][2][2] = 'href="app/view/negocio/register.php" target="ifr_colum_der"';
	
	
	$mod[4][0][0] = "CONFIGURACION";
	$mod[4][0][1] = "Empresa";
	$mod[4][0][2] = 'href="app/view/negocio/register.php" target="ifr_colum_der"';
	
	$mod[4][1][0] = "CONFIGURACION";
	$mod[4][1][1] = "Surculsal";
	$mod[4][1][2] = 'href="app/view/negocio/register.php" target="ifr_colum_der"';
	
	$mod[4][2][0] = "CONFIGURACION";
	$mod[4][2][1] = "Almacen";
	$mod[4][2][2] = 'href="app/view/negocio/register.php" target="ifr_colum_der"';
	
	
	$i = $j = 0;	
	$html  ='<div id="menu">';
	$html .=	'<div class="color_azul" style="height: 30px; font-weight:bold;text-align:center">Panel de Control</div>';
	foreach ($mod as $v1){ $i++;
		$html .='<ul class="menu_lista">';
		$html .=	'<li id="_'.($i).'" class=" menu_lista_rew">';
		$html .=		'<div style="float:left"><img src="img/folder_32.png" width="24" height="24" /></div>';
		$html .=		'<div style="float:left;margin:5px">'.($v1[0][0]).'</div>';
		$html .=	'</li>';
		$html .=	'<li id="_'.($i).'_'.($i).'" class=" menu_sub_lista" style="display:none;">';
		$html .=		'<ul>';
		foreach ($v1 as $v2){ $j++;
			$html .=		'<a '.$v2[2].'>';
			$html .=			'<li id="_'.($i).'__'.($j).'" class="rew">';
			$html .=				'<img src="img/folder.png" style="margin-right:5px"/>'.$v2[1];
			$html .=			'</li>';
			$html .=		'</a>';
		} $j=0;
		$html .=		'</ul>';
		$html .=	'</li>';
		$html .='</ul>';
	}
	$html .='</div>';
	echo $html;
?>

<script language="JavaScript" type="text/JavaScript">
	//script para el control de los botones del menu...
	var tmp_id_HTML = "";
	function display_menu(jQuery,id_HTML,id_HTML2,id_HTML3){
		if(id_HTML){
			if(id_HTML != tmp_id_HTML){
				jQuery('.menu_lista_rew') .removeClass('_img_hover');
				jQuery('.menu_sub_lista').slideUp("fast");
				jQuery('.rew') .removeClass('rew_select');
			} 
			jQuery('#'+id_HTML) .toggleClass('_img_hover');  
			jQuery('#'+id_HTML+id_HTML).slideToggle("fast");
			tmp_id_HTML = id_HTML;
		} 
		if(id_HTML2){
			jQuery('.rew') .removeClass('rew_select');
			jQuery('#'+id_HTML2+' #'+id_HTML3) .addClass('rew_select');  
		}
	}
	(function($){
		$(document).ready(function() {
			var el;
			$('.menu_lista_rew').each(function(index){
				index = "_" + (index + 1);
				el = document.getElementById(index);
				el.setAttribute("onclick","display_menu(_jQuery,'"+(index)+"');");;
				$('#'+(index)+(index)+ ' .rew').each(function(index2){
					index2 = "__" + (index2 + 1);
					el = document.getElementById((index)+(index2));
					el.setAttribute("onclick","display_menu(_jQuery,'','"+(index)+(index)+"','"+(index)+(index2)+"');");
				});
			});
		});
	})(jQuery);
</script>